package com.glorystone.ins.dao;

import com.glorystone.ins.common.common.PageVo;
import com.glorystone.ins.common.common.Pageable;
import com.glorystone.ins.domain.BusinessLog;
import com.glorystone.ins.domain.CapitalRecord;
import com.glorystone.ins.interceptor.PageList;
import com.glorystone.ins.vo.CheckDataVO;
import com.glorystone.ins.vo.OrderQueryConditionVo;
import com.glorystone.ins.vo.ReceivableVO;
import com.glorystone.ins.vo.ReportDataVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ReceivableMapper {

    PageList<ReceivableVO> findReceivableList(@Param("vo") PageVo vo, Pageable pageable);

    PageList<CheckDataVO> findCheckDataList(@Param("vo") PageVo vo, Pageable pageable);

    List<ReceivableVO> queryReceivableListForCheck();

    int batchInsertCheckData(List<CheckDataVO> checkDataList);

    int deleteCheckData(long userId);

    List<CheckDataVO> selectCheckDataListByUserId(long userId);

    int batchUpdateReceivable(List<CheckDataVO> checkDataList);

    int batchUpdateReceivableInvoice(List<CheckDataVO> checkDataList);

    int batchUpdateReceivableGathering(List<CheckDataVO> checkDataList);

    List<ReportDataVO> queryReportDataList(ReceivableVO receivable);

    PageList<ReceivableVO> queryChannelTableData(@Param(value="vo") PageVo vo, Pageable pageable);

    int updateForOrderCheck(ReceivableVO receivable);

    List<CheckDataVO> queryCheckDataList();

    CapitalRecord getChannelCapitalRecordByOrderId(long ordId);

    ReceivableVO getReceivableForSurrender(long tid);

    void updateOverdueStatus(ReceivableVO receivable);

    int batchInsertBusinessLog(List<BusinessLog> logList);

    List<ReceivableVO> queryOrderCapitalRecord(OrderQueryConditionVo order);

    //根据TID查询应收订单数据用于单笔核对
    ReceivableVO queryReceivableForCheck(long tid);

    List<ReceivableVO> queryReceivableListForInvoice();

    List<ReceivableVO> queryReceivableListForGathering();

    List<ReportDataVO> queryReportChannelDataList(ReceivableVO receivable);
}